// src\service\goods.js
import axios from "axios";

export function getCategory() {
    return axios.get('/categories');
}

export function searchGood(params) {
    return axios.get('/search', { params });
}

export function getDetail(id) {
    // 商品详情接口的商品id通过路径传参的形式传递
    return axios.get(`/goods/detail/${id}`);
}